//
// Created by richard on 11/3/24.
//
#include "Database1.h"

Database1::Database1(int numRows) : db(std::make_unique<Db>(numRows)), pipeline(numRows) {}

inline void Database1::executeTransactions(const std::vector<Transaction>& transactions) {
    // pass the entire "transactions" to the pipeline
    pipeline.pipelineExecuteTransactions(transactions);
}

void Database1::run(const std::vector<Transaction>& transactions) {
    executeTransactions(transactions);
}